<div class="pageContent">
        <if condition="isset($authinfo)">
            <form method="post" action="__URL__/update" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
        <else />
            <form method="post" action="__URL__/insert" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
        </if>

        <div class="pageFormContent" layoutH="56">
            <div style="width:100%;float:left;">
                <label style="font-size:12px;margin-left:10px;">权限标题：</label>
                <input type="text" size="30" class="required" name="title" value="{$authinfo.title}"/>
            </div>
            <div style="width:100%;float:left;margin-top:10px;">
                <label style="font-size:12px;margin-left:10px;">上级权限：</label>
                <select name="parent_id" style="width: 200px;">
                    <option value="0">无</option>
                    <volist name="auths" id="auth">
                        <option value="{$auth.auth_id}" <?php if ($auth['auth_id'] == $authinfo['parent_id']){ echo"selected='true'"; } else {echo "";};?>>
                            {$auth.title}
                        </option>
                    </volist>
                </select>
                <span class="info">选择当前模块的上级模块，如需添加一级模块，请选择“无”。</span>
            </div>
            <div style="width:100%;float:left;margin-top:10px;">
                <label style="font-size:12px;margin-left:10px;">模块：</label>
                <input type="text" size="30" class="" name="controller" value="{$authinfo.controller}"/>
            </div>
            <div style="width:100%;float:left;margin-top:10px;">
                <label style="font-size:12px;margin-left:10px;">方法：</label>
                <input type="text" size="30" class="" name="action" value="{$authinfo.action}"/>
            </div>
            <div style="width:100%;float:left;margin-top:10px;">
                <label style="font-size:12px;margin-left:10px;">排序比重：</label>
                <input type="text" size="30" name="sortNum" value="{$authinfo.sortnum}"/>
                <span class="info">数值越小，排名越前。</span>
            </div>
            
            <input type="hidden" name="auth_id" value="{$authinfo.auth_id}" />

        </div>
        
        <div class="formBar">        
        <ul>
            <if condition="in_array('update', $privilegelist)">
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">保存</button>
                    </div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">取消</button>
                    </div>
                </div>
            </li>
            </if>
        </ul>
        </div>
    </form>
</div>